Skip to content

Fixed the links "!#" - #1

Open
ebastidas wants to merge 1 commit into
fullstacktraining:section-05from
ebastidas:section-05
Open

Fixed the links "!#"#1
ebastidas wants to merge 1 commit into
fullstacktraining:section-05from
ebastidas:section-05

Conversation

@ebastidas

Copy link
Copy Markdown

No description provided.

@tpiros

tpiros commented Jan 16, 2017

Copy link
Copy Markdown
Contributor

This change is only required when you use < Angular 1.4 I believe

@ebastidas

Copy link
Copy Markdown
Author

After cloning your repo to my computer, and running npm install and then node app.js, I cannot get the right routes without making the change "#/hotel/ to "#!/hotel/ in all the URLs in all the files. I am using your raw code, without any changes. I can see that angular@1.6.1 was downloaded, after running npm install, so I'm not running Angular 1.4.

@flesnjakovic

Copy link
Copy Markdown

Can also use following snippet in public/angular-app/app.js.

$locationProvider.html5Mode(true).hashPrefix('');

It even makes the URL path pretty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants